﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SubmitOCOApp.aspx.cs" Inherits="ASB.CC.Web.Common.SubmitOCOApp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Select Approver</title>
    <base target="_self" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <link href="../css/global.css" rel="stylesheet" type="text/css" />
    <link href="../css/style_fu.css" rel="stylesheet" type="text/css" />

    <script src="../js/jquery-1.4.4.min.js" type="text/javascript"></script>

    <script src="../js/ccworkflow.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
        function OnSubmit() {

            if ($("#dpLv4Approver").length > 0 && $("#dpLv4Approver option:selected").text().indexOf("Please select") >= 0) {
                alert("Please select the Lv4 Approver.\n请选择4级审批者! \n");
                event.returnValue = false;
            }

            var result = '';
            if ($("#dpLv3Approver").length > 0 && $("#dpLv3Approver option:selected").text().indexOf("Please select") >= 0) {
                result += "Please select the Lv3 Approver.\n请选择3级审批者! \n";
            }
            if ($("#dpLv2Approver").length > 0 && $("#dpLv2Approver option:selected").text().indexOf("Please select") >= 0) {
                result += "Please select the Lv2 Approver.\n请选择2级审批者! \n";
            }
            if ($("#dpLv1Approver").length > 0 && $("#dpLv1Approver option:selected").text().indexOf("Please select") >= 0) {
                result += "Please select the Lv1 Approver.\n请选择1级审批者! \n";
            }

            if (result != '') {
                alert(result);
                event.returnValue = false;
            }
        }

        function OnClose() {
            if (window.confirm("Are you sure to close the window ?\n")) {
                window.close();
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <h3 class="ev-header-section">
        &nbsp; Select Approver（选择审批人）
    </h3>
    <table cellspacing="0" cellpadding="0" width="100%" border="0">
        <tr class="ev-row2" id="trLv4Approver" runat="server" visible="false">
            <td class="title" style="width: 120px;">
                Lv4 Approver:<br />
                4级别审批者
            </td>
            <td class="val">
                <asp:DropDownList ID="dpLv4Approver" runat="server" Width="160">
                </asp:DropDownList>
            </td>
        </tr>
        <tr class="ev-row2" id="trLv4ApproverLabel" runat="server" visible="false">
            <td colspan="2">
                &nbsp;&nbsp;<asp:Label ID="lblNoneLv4Approver" runat="server" ForeColor="Red" Text="There aren't any Lv4 approvers. Please contact role admin to add."></asp:Label>
            </td>
        </tr>
        <tr class="ev-row2" id="trLv3Approver" runat="server" visible="false">
            <td class="title" style="width: 120px;">
                Lv3 Approver:<br />
                3级别审批者
            </td>
            <td class="val">
                <asp:DropDownList ID="dpLv3Approver" runat="server" Width="160" AutoPostBack="true">
                </asp:DropDownList>
            </td>
        </tr>
        <tr class="ev-row2" id="trLv3ApproverLabel" runat="server" visible="false">
            <td colspan="2">
                &nbsp;&nbsp;<asp:Label ID="lblNoneLv3Approver" runat="server" ForeColor="Red" Text="There aren't any Lv3 approvers. Please contact role admin to add."></asp:Label>
            </td>
        </tr>
        <tr class="ev-row2" id="trLv2Approver" runat="server" visible="false">
            <td class="title" style="width: 120px;">
                Lv2 Approver:<br />
                2级别审批者
            </td>
            <td class="val">
                <asp:DropDownList ID="dpLv2Approver" runat="server" Width="160" AutoPostBack="true">
                </asp:DropDownList>
            </td>
        </tr>
        <tr class="ev-row2" id="trLv2ApproverLabel" runat="server" visible="false">
            <td colspan="2">
                &nbsp;&nbsp;<asp:Label ID="lblNoneLv2Approver" runat="server" ForeColor="Red" Text="There aren't any Lv2 approvers. Please contact role admin to add."></asp:Label>
            </td>
        </tr>
        <tr class="ev-row2" id="trLv1Approver" runat="server" visible="false">
            <td class="title" style="width: 120px;">
                Lv1 Approver:<br />
                1级别审批者
            </td>
            <td class="val">
                <asp:DropDownList ID="dpLv1Approver" runat="server" Width="160">
                </asp:DropDownList>
            </td>
        </tr>
        <tr class="ev-row2" id="trLv1ApproverLabel" runat="server" visible="false">
            <td colspan="2">
                &nbsp;&nbsp;<asp:Label ID="lblNoneLv1Approver" runat="server" ForeColor="Red" Text="There aren't any Lv1 approvers. Please contact role admin to add."></asp:Label>
            </td>
        </tr>
        <tr class="ev-row2">
            <td colspan="2" class="padding5 ac">
                <asp:ResourceButton ID="Btn_Submit" runat="server" ToolTip="SubmitTips" CssClass="btn"
                    Text="Submit" />
                <asp:ResourceButton ID="Btn_Close" runat="server" Text="Close" ToolTip="CloseTips"
                    CssClass="btn" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
